package com.jeeplus.test.jlnu.admissionInfo.mapper;

import com.jeeplus.test.jlnu.admissionInfo.domain.entity.AdmissionInfo;
import com.jeeplus.test.jlnu.archivalInfo.domain.entity.ArchivalInfo;
import com.jeeplus.test.jlnu.graduationInfo.domain.entity.NewGraduationInfo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface ExcelMapper {

    int saveFirstData(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    int saveSecondData(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    int saveThirdData(@Param("admissionInfos") List<NewGraduationInfo> admissionInfos);

    int saveFourth(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    int saveFifth(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    int saveSixth(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    int saveSeventh(@Param("admissionInfos")List<AdmissionInfo> admissionInfos);

    int saveEighth(@Param("admissionInfos")List<ArchivalInfo> admissionInfos);
    @Delete("TRUNCATE TABLE jlnu_admission_info")
    void delete1();
    @Delete("TRUNCATE TABLE jlnu_archival_info")
    void delete2();
    @Delete("TRUNCATE TABLE jlnu_degree_info")
    void delete3();
    @Delete("TRUNCATE TABLE jlnu_employment_info")
    void delete4();
    @Delete("TRUNCATE TABLE jlnu_graduation_info")
    void delete5();
    @Delete("TRUNCATE TABLE jlnu_mailing_info")
    void delete6();
    @Delete("TRUNCATE TABLE jlnu_qualification_info")
    void delete7();
    @Delete("TRUNCATE TABLE jlnu_student_status_info")
    void delete8();

    int saveNinth(List<AdmissionInfo> admissionInfos);

    int saveTenth(List<AdmissionInfo> admissionInfos);

    int saveEleth(List<AdmissionInfo> admissionInfos);

    int saveTwelfth(List<AdmissionInfo> admissionInfos);

    int saveThirteenth(List<AdmissionInfo> admissionInfos);

    int saveFourteenth(List<AdmissionInfo> admissionInfos);

    int saveFifteenth(List<AdmissionInfo> admissionInfos);

    int saveSeventeenth(List<AdmissionInfo> admissionInfos);

    int saveSixteenth(List<AdmissionInfo> admissionInfos);

    int saveEighteenth(List<AdmissionInfo> admissionInfos);

    void delete9();
    void delete10();
    void delete11();
    void delete12();
    void delete13();
    void delete14();
    void delete15();
    void delete16();
    void delete17();
    void delete18();
    @Insert({
            "<script>",
            "INSERT INTO jlnu_admission_info (name, examinee_num, student_id, gender, birthday, nation, id_card, admission_schools, admission_academy, admission_major, educational_system)",
            "VALUES",
            "<foreach collection='admissionInfos' item='info' separator=','>",
            "(#{info.name}, #{info.examineeNum}, #{info.studentId}, #{info.gender}, #{info.birthday}, #{info.nation}, #{info.idCard}, #{info.admissionSchools}, #{info.admissionAcademy}, #{info.admissionMajor}, #{info.educationalSystem})",
            "</foreach>",
            "</script>"
    })
    void saveAdmission(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);

    void saveTec(@Param("admissionInfos") List<AdmissionInfo> admissionInfos);


    void delete19();
}
